import React, { useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useRecoilState } from "recoil";
import { homeTextState } from "@/state";
import styles from "./test.module.less";

const TestPage = () => {
  const navigate = useNavigate();
  const [text, setText] = useRecoilState(homeTextState);
  const areaRef = useRef(null);

  const handChange = () => {
    let a = text;
    setText(a + "0");
  };
  const handShow = () => {
    let refs: any = areaRef.current;
    console.log(refs.resizableTextArea.textArea.scrollHeight);
    refs.resizableTextArea.textArea.scrollTop =
      refs.resizableTextArea.textArea.scrollHeight;
  };
  return (
    <div className={styles["test-container"]}>
      <h1>test page</h1>
    </div>
  );
};
export default TestPage;
